﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
using DLL.Entities;
using DLL;

namespace MIS
{
    public partial class MIS : Form
    {
        public MIS()
        {
            InitializeComponent();
        }

        private void MIS_Load(object sender, EventArgs e)
        {
          
        }

        private void btn_LoadMis_Click(object sender, EventArgs e)
        {
            Missile Mis_Obj = new Missile();
            XmlSerializer serializer = new XmlSerializer(typeof(Missile));
            //here you gotta type cast the object into a type of class bogey
            Mis_Obj = (Missile)XMLHandler.ReadXML("../../../RAD/bin/Debug/Missiles_Serialzed.xml", serializer);
            MessageBox.Show("Deserialization Complete");

            lbl_MisCount.Text = Convert.ToString(Mis_Obj.misCount);
        }
    }
}
